<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="UTF-8">
	<title>定位和居中问题</title>
	<style type="text/css">
		.container{
			width: 400px;
			height: 200px;
			background: #ccc;
			position: absolute;
			left: 50%;top: 50%;
			transform: translate(-50%, -50%);
			overflow: hidden;
		}
		.left,.right{
			background: yellow;
			width: 100px;height: 100px;
			border-radius: 100%;
			position: absolute;
		}
		.left{
			top: -50px;
			left: -50px;
		}
		.right{
			right: -50px;
			bottom: -50px;
		}

	</style>
</head>
<body>
	<div class="container">
		<div class="left"></div>
		<div class="right"></div>
	</div>
	
</body>
</html>
